#黑帽
import cv2
import numpy as np

img = cv2.imread('bilibili.png')
cv2.imshow('img',img)
cv2.waitKey(0)
kernel = np.ones((8,8),np.uint8)
blackhat = cv2.morphologyEx(img, cv2.MORPH_BLACKHAT, kernel)
cv2.imshow('blackhat',blackhat)
cv2.waitKey(0)
